Introduction to Git
September 4, 2021 posted by Junior Kian Chong
Introduction To GIT
GIT was created by Linus Torvald, who is the creator of Linux, in 2005. They are Open source projects used for the distributed version control system to develop several types of commercial and non-commercial projects as GIT is a distributed version, they could be used as a server for managing repositories. The main goal of it is they support non-linear developments with good speed and can handle large projects deliberately.
In earlier days, we keep track of our work to make a copy, modifications of the files, but after version control, we can manage files in a professional manner explicating folder concepts; most interestingly it allows us to restore previous versions of project work. So, GIT helps in tracking codes by storing them in versions on its own local repository called GITHUB. GITHUB is a website where we can upload a copy of files stored in the repository. GIT uses a low-level language called C language.
The various process like designing, product management, development, marketing, and customer support can be easily handled using GIT. It favors both programmers and non-technical users keeping monitor the history of their project files by storing different versions of files. The main purpose of GIT is to manage source code in software development or a file that changes over time. GIT is needed to prevent code conflicts between the developers.
Git represents commit; many operations are faster in git, such as switching to another commit and comparing them. A code can be put into the cloud on GitHub, GitLab, or bit bucket. The three local areas of git are the working directory, staging area, and git repository. The object types include blobs, trees, commits, tags. Blobs and trees represent files, and directories and tags are metadata.
Some basic commands of git are as follow:
- Git Pull
- git add
- git Commit
- git Push
- They are free and open-source with multiple backups and added staging areas.
- GIT provides users to work with both online and offline. Commit operations are possible even if offline. GIT repository plays a vital role which is a large hash table.
- GIT has the last commit (undo operations) and revert options for unnecessary changes.
- It has a good feature called Restore delete a commit, which is essential in larger projects.
- They have good security protection against the alteration of files and maintains the authentic history of source files. In git, any revision is given a 40-bit key for all the repositories copies.
- GIT has better flexibility by supporting non-linear development workflows for both large and smaller projects. They read data directly from the local.
- GIT has integrity (means they are check-summed) with SHA-1 inside and distributed development (changes are copied from one repository to the other).
- They make use of a pack file that stores a large number of compressed object files in a single file. In Git, we can easily work with our own workflow (feature-based workflow).
- They have good compatibility with protocols like HTTP, FTP, rsync to publish the repositories and have portable control systems.
- The basic characteristics include they support whole package versions. For remote connectivity, they use HTTP for read-only access. Branches are light -weighted.
- GIT in product management – they give up more frequent customer feedback and updates.
- It can be used as a graphical application.
- Government Agencies use GITHUB to share and collaborate processes (They can add their organizations and create pull request).
- It helps in building real-time web applications and is popularly used in Android applications as well as many commercial organizations. They increase the team’s productivity with continuous integration and developments.
- GIT can be used in various Operating systems like Fedora, Windows, Red Hat, and other Linux systems using GIT commands.
- They are used to develop core Linux kernel.
- Used in many open source projects like Ruby on Rails, Perl, the Linux Kerne
- Good distributed model as each developer gets a local repository with a full history of commits which makes git fast compared to other VCs.
- Branching capabilities and merging are easy (as they are cheap), good data integrity.
- They are free and open-source we can easily download the source code and performs changes to it. They can handle larger projects efficiently.
- The push/pull operations are faster with a simple They save time and developers can fetch and create pull requests without switching.
- Data redundancy and replications. Add ons can be written in many languages.
- They have good and faster network performance and superior disk utilization and they think about its data like a sequence of snapshots.
- The object model is very simple and minimizes push/pull data transfers.
- GIT requires technical excellence and it is slower on windows. They have tedious command lines to input and don’t track renames.
- They have poor GUI and usability. And also, they take a lot of resources which slows down the performance.
- GIT doesn’t support checking out sub-trees. For each project, the central service would need to be set up for multiple package repositories.
- It lacks window support and doesn’t track empty folders.
- GIT needs multiple branches to support parallel developments used by the developers.
- There is no built-in access control and doesn’t support binary files.
- They do not provide access control mechanisms in case of security.
- The process of Packing is very expensive completely. Coding . Git
Main Components of GIT
In the above section, we have seen the basic introduction to GIT. Now we are going ahead with the main components of GIT. GIT is primarily a command-line tool.
The three states of git (workflow) are:
Committed: Takes the file from the staging area and stores it to snapshot permanently in the git.
Modified: It takes files from the working directory(modified/unmodified)
Staged Adds snapshots to the staging area.
The three main parts of git projects are:
GIT directory: It stores the object database where cloning takes place in the repository to another remote computer.
Working tree: Files are pulled out from the database and placed on the disk for modifications.
Staging area: This acts as an index part that directs to go the next commit.
GIT hub has six main steps when implemented. They are creating a branch, add commits, open a pull request, review code, merge, deploy.
Characteristics of GIT
Applications of GIT
The applications of GIT are as below:
Advantages and Disadvantages
As we have studied the characteristics and applications of introduction to GIT now we are going to understand the advantages and disadvantages of GIT are as follows :
Advantages
Below are the advantages:
Disadvantages
Below are the disadvantages: